package br.ufmg.ubicomp.droidguide.application;

import br.ufmg.ubicomp.droidguide.utils.AndroidUtils;
import android.app.Activity;
import android.widget.ArrayAdapter;

public abstract class DroidGuideScreenActivity extends Activity {

	protected void showAlert(String msg)
	{
		AndroidUtils.showAlert(this, msg);
	}
	
	protected void notifyError(Exception e, String op)
	{
		AndroidUtils.notifyError(e, this, op);
	}

	protected ArrayAdapter<String> createAdapter(int arrayId) {
		ArrayAdapter<String> adapter = new ArrayAdapter<String>(this,
				android.R.layout.simple_spinner_item, 
				getResources().getStringArray(arrayId));
		adapter.setDropDownViewResource(
				android.R.layout.simple_spinner_dropdown_item);		
		return adapter;
	}
}
